{extend name="header_public" /}
{block name="title"}“{$keyWords}”搜索结果 - {$options.siteName}{/block}
{block name="content"}
<link rel="stylesheet" href="/static/css/search.css" />
</head>

<body data-ma-header="teal">
    <nav class="navbar navbar-inverse">
        <div class="container-fluid">
            <div class="container">
                {include file="navbar_public" /}
                <div class="header-panel shadow-z-2">
                    <div class="container-fluid">
                        <div class="row">
                        </div>
                    </div>
                </div>
                <div class="container main-h">

                    <div class="col-md-12">
                        <h1>搜索分享</h1>
                        <input type="text" placeholder="请输入关键词，回车键发起搜索" value="{$keyWords}" autofocus="true"><br><br>
                        <div class="table-responsive">
                            {volist name='list' id='shares'}
                            <div class="col-xs-4 col-md-2 thumbbox">
                                <a href="/s/{$shares.share_key}" class="thumbnail thumblink">
                                    <span class="thumbspan">
                                        <img src="/Share/PreviewXml/{$shares.share_key}" alt="{$shares.fileData|htmlspecialchars=ENT_NOQUOTES}">
                                    </span>
                                    <div class="file_info">
                                        <span class="view_span">
                                            <i class="fa fa-eye" aria-hidden="true"></i> 
                                            <span id="view_num">{$shares.view_num}</span>
                                        </span>
                                        <span class="down_span">
                                            <i class="fa fa-edit" aria-hidden="true"></i> 
                                            <span id="down_num">{$shares.download_num}</span>
                                        </span>
                                    </div>
                                </a>
                                <div class="share-name"><div>{$shares.fileData|htmlspecialchars=ENT_NOQUOTES}</div></div>
                            </div>
                            {/volist}
                        </div>
                        {$listOrigin->render()}
                    </div>

                </div>
            </div>
</body>
<script type="text/javascript">
</script>
<script src="/static/js/material.js"></script>
<script>
    $.material.init();
    document.onkeydown = function (event) {
        if (event.keyCode == 13) {
            keyWords = $("input").val();
            // if (keyWords == "") {
            //     toastr["warning"]("关键字不能为空");
            // } else {
            //     window.location = "/Explore/S/" + keyWords;
            // }
            window.location = "/Explore/Search/" + keyWords;
        }
        else {

        }
    }
</script>
{$options.js_code}
{/block}